package com.herui.ota.service.iml;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.herui.ota.dao.mysql.AppPushRecordMapper;
import com.herui.ota.entity.AppPushRecord;
import com.herui.ota.service.AppPushRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * author name: amanda.shan
 * create time: 2024-05-09 17:16:00
 */ 
@Service
public class AppPushRecordServiceIml extends BaseService<AppPushRecordMapper, AppPushRecord> implements AppPushRecordService{

	@Autowired
	@Override
	public void setBaseMapper(AppPushRecordMapper baseMapper) {
		super.setBaseMapper(baseMapper);
	}

	@Override
	public boolean exist(String pushUserKey, Integer appPushId) {
		int count = count(new QueryWrapper<AppPushRecord>().eq("app_push_id", appPushId).eq("push_user_key",
				pushUserKey));
		return count > 0;
	}
}

